package practice;

/**
 * Description:
 *
 * @Author cowen
 * @Create 2023/10/19 10:54
 * @Version 1.0
 */
class ArrayLinearSearch{
    public static void main(String[] args) {
        int[] nums = {1,2,3,4,5,8,7};
        int target =5;
        for (int i = 0; i < nums.length; i++) {
            if(nums[i]==target){
                System.out.println("找到了："+target+", 所在位置为："+i);
            }
        }
    }
}